package com.molichuxing.services.infrastructure.service;

import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.infrastructure.dto.request.create.StatisticsOrderCreateDto;
import com.molichuxing.services.infrastructure.dto.response.PieChartDto;
import com.molichuxing.services.property.StatisticsOrderTypeEnum;

import java.time.LocalDate;
import java.util.List;

/**
 * @Author: renzhengyu
 * @Description: 订单统计
 * @Date: Created in 10:10 2020/1/6
 * @Modified By:
 **/
public interface BasicdataStatisticsOrderService extends RootService {

    /**
     * 创建当日订单统计
     * @param statisticsOrderCreateDto
     */
    int createStatisticsOrder(StatisticsOrderCreateDto statisticsOrderCreateDto);

    /**
     * 根据时间和类型查询折线图信息
     * @param statisticsOrderTypeEnum
     * @param startTime
     * @param endTime
     * @return
     */
    List<PieChartDto> getStatisticsOrderByDate(StatisticsOrderTypeEnum statisticsOrderTypeEnum, LocalDate startTime, LocalDate endTime);


    /**
     * 根据时间和类型查询时间区间内的订单总数
     * @param statisticsOrderTypeEnum
     * @param startTime
     * @param endTime
     * @return
     */
    Integer getStatisticsOrderCountByDate(StatisticsOrderTypeEnum statisticsOrderTypeEnum, LocalDate startTime, LocalDate endTime);

}
